package com.hrt.web.mailRecord.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hrt.base.BaseDaoImpl;
import com.hrt.bean.MailRecord;
import com.hrt.web.mailRecord.dao.MailRecordDao;
@Repository
public class MailRecordDaoImpl extends BaseDaoImpl<MailRecord> implements MailRecordDao{
	

	@Override
	public MailRecord getCodeByMail(String mail) {
		MailRecord mailRecord = null;
		String hql = "select m from MailRecord m where m.mail='"+mail+"' and m.isdelete=0 and m.isinvalid=0";
		List list = getHibernateTemplate().find(hql);
		if(list!=null&&list.size()>0){
			mailRecord = (MailRecord) list.get(0);
		}
		return mailRecord;
	}

	

}
